<template>
  <div>
      <input class="t_input" :value="placeholder" type="text" @input="emitValue" placeholder="可以输入一些值">
  </div>
</template>

<script lang='ts' > 

    import { defineComponent } from 'vue'
    export default defineComponent ({
        name:'linput',
        props:{
            placeholder: [ String,Number]
        },
        setup( props,{emit} ) {
            const emitValue = (e: any): void => {
                emit('update:placeholder',e.target.value)
            }
            return {
                emitValue
            }
        }
    })
</script>

<style lang="less" scoped>
    .t_input{
        height: 40px;
        width: 300px;
        border-radius: 5px;
        border: 1px solid #3eaf7c;
        text-align: center;
    }
</style>